//
//  UIView+Inspectable.swift
//  新浪微博
//
//  Created by mac on 16/5/22.
//  Copyright © 2016年 mac.com. All rights reserved.
//

import UIKit
extension UIView {
    @IBInspectable var cornerRadius:CGFloat{
        get{
        return layer.cornerRadius
        }
        set{
        layer.cornerRadius = newValue
        }
    }
    @IBInspectable var borderWidth:CGFloat{
        get{
            return layer.borderWidth
        }
        set{
            layer.cornerRadius = newValue
        }
    }

    @IBInspectable var borderColor: UIColor {
        get {
            //将 CGColor转换为 UIColor
            return UIColor(CGColor: layer.borderColor!)
        }
        
        set {
            layer.borderColor = newValue.CGColor
        }
    }


}
